package com.tender.controller;

import com.tender.common.ActionResult;
import com.tender.dtos.GisCategoryDTO;
import com.tender.exceptions.DataException;
import com.tender.model.GisPointDataRecordForm;
import com.tender.model.GisPointDataRecordInfoVO;
import com.tender.model.GisPointDataRecordListVO;
import com.tender.model.GisPointDataRecordPagination;
import com.tender.page.PageListVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * gisPointDataRecord
 *
 * @版本： V3.1.0
 * @版权： 引迈信息技术有限公司（https://www.jnpfsoft.com）
 * @作者： JNPF开发平台组
 * @日期： 2024-12-16
 */
@Slf4j
@RestController
@Tag(name = " 物流可视化-gis坐标自维护接口", description = "物流可视化-gis坐标自维护接口")
//@RequestMapping("/api/visualization/gis/record")
@RequestMapping("/api/visualization/GisPointDataRecord")
public class GisPointDataRecordController {

    @GetMapping("/category/list")
    public ActionResult<List<GisCategoryDTO>> getGisCategoryList() {
        return ActionResult.success();
    }

    /**
     * 列表
     *
     * @param gisPointDataRecordPagination
     * @return
     */
    @Operation(summary = "获取列表")
    @PostMapping("/getList")
    public ActionResult<PageListVO<GisPointDataRecordListVO>> list(@RequestBody GisPointDataRecordPagination gisPointDataRecordPagination) throws IOException {
        return ActionResult.success();
    }

    /**
     * 创建
     *
     * @param gisPointDataRecordForm
     * @return
     */
    @PostMapping
    @Operation(summary = "创建")
    public ActionResult<String> create(@RequestBody @Valid GisPointDataRecordForm gisPointDataRecordForm) throws DataException {
        return ActionResult.success("创建成功");
    }


    /**
     * 信息
     *
     * @param id
     * @return
     */
    @Operation(summary = "信息")
    @GetMapping("/{id}")
    public ActionResult<GisPointDataRecordInfoVO> info(@PathVariable("id") String id) {
        return ActionResult.success();
    }

    /**
     * 表单信息(详情页)
     *
     * @param id
     * @return
     */
    @Operation(summary = "表单信息(详情页)")
    @GetMapping("/detail/{id}")
    public ActionResult<GisPointDataRecordInfoVO> detailInfo(@PathVariable("id") String id) {
        return ActionResult.success();
    }


    /**
     * 更新
     *
     * @param id
     * @param gisPointDataRecordForm
     * @return
     */
    @PutMapping("/{id}")
    @Operation(summary = "更新")
    public ActionResult<String> update(@PathVariable("id") String id, @RequestBody @Valid GisPointDataRecordForm gisPointDataRecordForm) throws DataException {
        return ActionResult.success("更新成功");
    }


    /**
     * 批量删除
     *
     * @param ids
     * @return
     */
    @PostMapping("/batchRemove")
    @Operation(summary = "批量删除")
    public ActionResult<String> batchRemove(@NotNull @RequestBody List<String> ids) {
        return ActionResult.success("删除成功");
    }

    @Operation(summary = "删除")
    @DeleteMapping("/{id}")
    public ActionResult<String> delete(@PathVariable("id") String id) {
        return ActionResult.success("删除成功");
    }

}
